//app.js
App({
  globalData: {
    userInfo: {},
    //url: 'http://192.168.137.1:8091',//出租房无线
    //url: 'http://192.168.174.1:8091',
    url: 'http://192.168.3.24:8091',//公司wifi
    loginFlag:'',//自定义登录状态sh1(oid+sk)
    navHeight:'',
    navTop:'',
    windowHeight:''
  },
  onLaunch: function () {
    let menuButtonObject = wx.getMenuButtonBoundingClientRect();
    wx.getSystemInfo({
      success: res => {
        let statusBarHeight = res.statusBarHeight,
          navTop = menuButtonObject.top,//胶囊按钮与屏幕顶部的距离
          navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight)*2;//导航高度
        this.globalData.navHeight = navHeight;//----整个导航高度
        this.globalData.navTop = navTop;//----胶囊按钮与屏幕顶部的距离 top
        this.globalData.windowHeight = res.windowHeight;//----状态栏高度
      },
      fail(err) {
        console.log(err);
      }
    })
  }
})